package com.ygs.secs.mapper;

import com.ygs.secs.model.EnterpriseJob;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface EnterpriseJobMapper {
    /**
     * delete by primary key
     *
     * @param jobid primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String jobid);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(EnterpriseJob record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(EnterpriseJob record);

    /**
     * select by primary key
     *
     * @param jobid primary key
     * @return object by primary key
     */
    EnterpriseJob selectByPrimaryKey(String jobid);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(EnterpriseJob record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(EnterpriseJob record);

    int updateBatch(List<EnterpriseJob> list);

    int updateBatchSelective(List<EnterpriseJob> list);

    int batchInsert(@Param("list") List<EnterpriseJob> list);

    /**
     * 获取所有岗位
     *
     * @return 岗位集合
     */
    List<EnterpriseJob> getjobList();

    /**
     * 通过企业ID查询岗位
     *
     * @param enterpriseid 企业ID
     * @return 岗位集合
     */
    List<EnterpriseJob> getjobListbypriseId(String enterpriseid);

    List<EnterpriseJob> getjobListbyjobname(@Param("enterpriseid") String enterpriseid, @Param("jobname") String jobname);

    EnterpriseJob getjobdetailbyid(String jobid);

    List<EnterpriseJob> getRecommendjoblist(@Param("postionnum") Integer postionnum);

    List<EnterpriseJob> getsimilarPositionlist(String jobtype);

    List<EnterpriseJob> getjoblistbycommpanyname(String kw);

    List<EnterpriseJob> getjobListbyjobwithauthinfo(@Param("jobname") String jobname, @Param("qz1") String qz1, @Param("qz2") String qz2);
}